package com.billing.web.controller;

import com.billing.model.entity.TUser;
import com.billing.utils.MD5Util;

/**
 * APP访问身份认证
 * @author Administrator
 *
 */
public class IdentityController {

	public static final String INSERTCLOCKIN="insertClockin";//APP打卡
	public static final String GETCLOCKIN="getClockin";//APP获取打卡信息
	public static final String GETUSERPAYREPORTAPP="getUserPayReportApp";//APP查看薪酬报表信息
	public static final String HANDLEAPPROVE="handleApprove";//APP审批办理
	public static final String SAVEAPPROVE="saveApprove";//APP审批提交
	public static final String GETAPPROVELIST="getApproveList";//APP获取审批列表信息
	public static final String GETUSERLIST="getUserList";//APP获取审批人或抄送人列表信息
	public static final String GETAPPROVEDETAIL="getApproveDetail";//APP获取审批详情信息
	public static final String GETUSERDETAIL="getUserDetail";//APP获取人员信息
	public static final String GETUSERUNITS="getUserUnits";//App获取用户加班单位信息
	public static final String GETMONTHLYCALENDAR="getMonthlycalendar";//APP获取月历信息
	public static final String GETYEARMONTHDAY="getYearMonthDay";//APP根据年月日获取打卡信息
	public static final String SHOWCRMCUSTOMERLIST="showCrmCustomerList";//APP查询CRM客户列表
	public static final String SHOWCRMCUSTOMER="showCrmCustomer";//APP查询CRM客户详情
	public static final String SHOWCRMLINKMANLIST="showCrmLinkmanList";//APP查询CRM联系人列表
	public static final String SHOWCRMLINKMAN="showCrmLinkman";//APP查询CRM联系人详情
	public static final String ADDCRMCUSTOMER="addCrmCustomer";//APP新增CRM客户
	public static final String ADDCRMLINKMAN="addCrmLinkman";//APP新增CRM联系人
	public static final String SHOWCRMCONTACTLIST="showCrmContactList";//APP CRM跟进记录列表
	public static final String ADDCRMCONTACT="addCrmContact";//APP新增CRM跟进记录
	public static final String UPLOADCARD="uploadCard";//APP名片上传识别
	public static final String ADDCRMLINKMANBYCARD="addCrmLinkmanByCard";//APP名片上传识别保存
	public static final String UPLOAD="upload";//文件上传
	public static final String GETARCHIVESDATA="getArchivesData";//APP获取人员信息
	public static final String UPDATEBASICDATA="updateBasicData";//APP更新基本信息
	public static final String UPDATEWORKDATA="updateWorkData";//APP增加/更新工作经历信息
	public static final String GETWORKDATABYID="getWorkDataByid";//APP按ID查找工作经历信息
	public static final String GETWORK="getWork";//APP我的工作经历
	public static final String UPDATEPRIVATEDATA="updatePrivateData";//APP更新私密信息
	public static final String GETPRIVATEBYUID="getPrivateByuid";//APP按userID查找私密信息
	public static final String GETPRIVATEBYID="getPrivateByid";//APP按ID查找私密信息
	public static final String ADDEMERGENCYCONTACT="addEmergencycontact";//APP增加/更新我的紧急联系人
	public static final String GETEMERGENCYCONTACTBYID="getEmergencycontactByid";//APP按ID查找紧急联系人
	public static final String GETEMERGENCYCONTACT="getEmergencycontact";//APP我的紧急联系人
	public static final String GETPERSONALFILESDATA="getPersonalfilesData";//APP个人档案信息界面
	public static final String UPDATESCAN="updateScan";//APP增加/更新附件信息
	public static final String ADDEDUCATION="addEducation";//APP新增/更新学历保存
	public static final String GETEDUCATIONBYID="getEducationByid";//APP按ID查找学历信息
	public static final String SWITCHOVERCOMPANY="switchoverCompany";//APP切换公司
	
	public static boolean authentication(TUser user,String code,String sign){
		byte[] by=(code+user.getId()+user.getToken()+user.getLogintime()).getBytes();
		String token=MD5Util.digest(by);
		if(!token.equals(sign)){
			return false;
		}else{
			return true;
		}
	}
	
}
